<html>
<head><meta charset="utf-8"><title>&#x27;static in Chalk · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html">&#x27;static in Chalk</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="208451666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208451666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208451666">(Aug 29 2020 at 20:10)</a>:</h4>
<p>So, I've been thinking about how we should deal with 'static in Chalk. In rustc, there's a specific variant of <code>RegionKind</code>: <code>ReStatic</code>. In my latest Chalk integration PR, I replace <code>ReStatic</code>s with a <a href="https://github.com/rust-lang/rust/blob/2fd14de751597637aed84db3f7234c46b0377877/src/librustc_traits/chalk/mod.rs#L46">placeholder</a>, but that's <em>probably</em> not the right solution, especially long term.</p>



<a name="208451671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208451671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208451671">(Aug 29 2020 at 20:10)</a>:</h4>
<p>But how <em>do</em> we want to handle it</p>



<a name="208451682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208451682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208451682">(Aug 29 2020 at 20:11)</a>:</h4>
<p>Do we want to add the idea of <code>'static</code> in Chalk?</p>



<a name="208451690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208451690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208451690">(Aug 29 2020 at 20:11)</a>:</h4>
<p>But I had a question:</p>



<a name="208451695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208451695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208451695">(Aug 29 2020 at 20:11)</a>:</h4>
<p>Does <br>
<code>'static'</code> equal <code>forall&lt;'a&gt; : 'a</code></p>



<a name="208452796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208452796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208452796">(Aug 29 2020 at 20:35)</a>:</h4>
<p>That looks like something that should work</p>



<a name="208452883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208452883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> detrumi <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208452883">(Aug 29 2020 at 20:37)</a>:</h4>
<p>But introducing a quantifier for every 'static might not be very performant</p>



<a name="208453382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/208453382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#208453382">(Aug 29 2020 at 20:49)</a>:</h4>
<p>Well, for all intents and purposes, we <em>do</em> wrap basically everything in a <code>forall</code></p>



<a name="209028944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/209028944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#209028944">(Sep 03 2020 at 21:01)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> I'm trying to remember my opinion on this :)</p>



<a name="209028958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/209028958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#209028958">(Sep 03 2020 at 21:01)</a>:</h4>
<p>I know I thought about it</p>



<a name="209029085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/209029085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#209029085">(Sep 03 2020 at 21:01)</a>:</h4>
<p>I guess I lean currently towards the idea that it may be convenient to simply add <code>'static</code> as a custom thing; it's definitely going to need special mention in the rules, since for example we know that <code>forall&lt;'a&gt; { Outlives('static: 'a) }</code> is true</p>



<a name="209029292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/209029292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#209029292">(Sep 03 2020 at 21:03)</a>:</h4>
<p>I know in your <code>outlives</code> branch you had added in <code>'static</code></p>



<a name="209029589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/%27static%20in%20Chalk/near/209029589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/&#x27;static.20in.20Chalk.html#209029589">(Sep 03 2020 at 21:06)</a>:</h4>
<p>I don't know where I lean on this. Like, it would be cool if we could express <code>'static</code> in Chalk terms without a special thing. Like, it feels a bit more...pure, I guess? But I guess it doesn't matter that much. And we already some "extra" logic in terms on builtin type and traits</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>